<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>14_选择器-伪类选择器-结构伪类选择器-nthOfType-nthLastOfType</title>
    
        <style>
            /* ul li:nth-child(2) {
                color: red;
            } */

            /* 找到同类型中的第几个元素 */
            /* ul li:nth-of-type(2) {
                color: green;
            } */


            /* ul li:nth-last-child(2) {
                color: tomato;
            } */


            ul li:nth-last-of-type(2) {
                color: yellowgreen;
            }
 

        </style>
    
    </head>
    <body>
        <ul>
            <span>王女士</span>
            <li>左女士</li>
            <li>次女士</li>
            <li>黄女士</li>
            <li>张女士</li>
            <span>董女士</span>
        </ul>
    </body>
</html>